<template>
    <div>
        <tab-ber :current="3"></tab-ber>
        <div @click="goback"><i class="iconfont icon-fanhui"></i></div>
        <div class="header">
            <span>问题反馈</span>
        </div>
        <div class="content">
            <textarea placeholder="请输入您的问题反馈" v-model="textvalue"></textarea>
            <input placeholder="请输入您的联系方式(选填)" v-model="phonenum"/>
            <div class="bot" @click="add">提交</div>
        </div>
    </div>
</template>

<script>
import TabBer from '../public/tabber'
export default {
  name: 'feedback',
  components: {TabBer},
  data () {
    return {
      textvalue: '',
      phonenum: ''
    }
  },
  methods: {
    goback () {
      this.$router.go(-1)
    },
    add () {
      console.log(this.textvalue)
      this.$g.ajax({
        path: 'Feedbacks/add',
        method: 'post',
        data: {
          action_type: 'course',
          content: this.textvalue,
          contact: this.phonenum
        },
        cbSuccess (data) {
          console.log(data)
        },
        cbError (error) {
          console.log(error)
        }
      })
    }
  }
}
</script>

<style scoped lang="scss">
.icon-fanhui{
    position: absolute;
    color: #383838;
    top: 12px;
    left: 10px;
}
.header{
    background-color: #ffffff;
    color: #383838;
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid #f3f3f3;
}
.content{
    padding: 24px;
    textarea{
        border: 1px solid #e5e5e5;
        width: 96%;
        resize:none;
        height: 200px;
        background-color: #f2f3f6;
        padding: 6px;
    }
    textarea::placeholder{
        color: #999999;
    }
    input{
        margin-top: 14px;
        border: 1px solid #e5e5e5;
        width: 96%;
        height: 26px;
        background-color: #f2f3f6;
        padding: 6px;
    }
    input::placeholder{
        color: #999999;
    }
    .bot{
        margin-top: 60px;
        width: 100%;
        height: 40px;
        font-size: 16px;
        text-align: center;
        line-height: 40px;
        background-color: #0a51cc;
        color: #ffffff;
    }
}
</style>
